<h1>{$obj.obj_name|stripslashes|htmlentities}</h1><br />
<div style="padding:10px;">
	{if is_array($aFormFields) }
		{if $obj.obj_link_obj_id > 0}
			<p class="error">
				Achtung! Diese Inhalte dieses Objekts wurden vererbt. Wenn Sie den Inhalt erneut speichern wird die Vererbung aufgel&ouml;st und der Inhalt lokal gespeichert.
			</p>					
		{/if}
		<form id="form_content_id_{$obj.obj_id}">
			{if $obj.obj_link_obj_id > 0}
				<input type="hidden" id="obj_vers_id_{$obj.obj_id}" name="obj[{$obj.obj_id}][obj_vers_id]" value="" />
			{else}
				<input type="hidden" id="obj_vers_id_{$obj.obj_id}" name="obj[{$obj.obj_id}][obj_vers_id]" value="{$obj_vers_id}" />
			{/if}
			{foreach name="formfieldloop" item=field from=$aFormFields}
					{if file_exists("`$CMS_TPL_DIR`forms/`$field.tpl_file`")}
						{include file="`$CMS_TPL_DIR`forms/`$field.tpl_file`" content=$field obj=$obj prefix="obj[`$obj.obj_id`]" aFormFields=$aFormFields}

					{else}
						<strong>MISSING template file &laquo; {$CMS_TPL_DIR}forms/{$field.tpl_file} &raquo;</strong> for formtype: {$field.formtype}<br />
					{/if}
					{if $field.tpl_file != 'hidden.tpl' && (isset($field.userlevel) && $smarty.session.CMS.user_level >= $field.userlevel) OR !isset($field.userlevel)}
						<div class="clear" style="margin-bottom:10px;border-bottom: 1px solid #a8c9d7;text-align:center;color: #20a1d6;font-weight:bold;font-size:20px;">&nbsp;</div>
					{/if}
			{/foreach}
			{if $obj.permissions.modify == 1}
				{if 0 < $save_templates|@count}
					{foreach from=$save_templates item="tpl}
						{include file=$tpl}
					{/foreach}
				{else}
					<div class="divFormFieldLabel">&nbsp;</div>
					<div class="divFormFieldInput"><input type="button" name="submitbtn" value="{$smarty.config.ContentEditor_save}" class="submitbtn" onclick="{literal}tinyMCE.triggerSave(false, false);xajax.request({ccdsclass:'ccdsContentEditor',ccdsfun:'ContentEditorSave'},{parameters:[xajax.getFormValues('form_content_id_{/literal}{$obj.obj_id}{literal}')]});{/literal}"/></div>
					<br style="clear:both;" />
				{/if}
			{else}
				{$smarty.config.ContentEditor_no_permissions}
				
			{/if}
		</form>
		<div id="obj_{$obj.obj_id}_versions_div">
			{include file="`$ccdsContentEditor_DIR`content_edit_versions.tpl" obj=$obj objversions=$objversions}
		</div>
	{else}
				{$smarty.config.ContentEditor_no_data} 
		
	{/if}
</div>